

testdata()
    {
    rowcount=${1:-1000}
    filename=barberry-${rowcount}.xml
    filepath=/tmp/${filename}

    cat head.txt > ${filepath}
    for (( i = 0 ;  i < rowcount;  i++  ))
    do
        echo "<TR><TD>${RANDOM}${RANDOM}</TD><TD>${RANDOM}${RANDOM}</TD><TD>test-tag-$((RANDOM / 1024))</TD><TD>0.${RANDOM}${RANDOM}</TD></TR>" >> ${filepath}
    done
    cat tail.txt >> ${filepath}
    } 

testdata 10
testdata 100
testdata 1000
testdata 10000
testdata 100000
testdata 1000000
testdata 10000000

